export default {
	methods: {
		callPhone(phoneNumber) {
			uni.makePhoneCall({ phoneNumber })
		},
		toScan(type = 0) {
			return new Promise((success, fail) => {
				uni.scanCode({
					success,
					fail,
				})
			})
		},
		previewImage(urls, current = 0) {
			uni.previewImage({
				current,
				urls: Array.isArray(urls) ? urls : [urls],
			})
		},
	},
}
